//
//  KLSGRecommendheader.m
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/10/28.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "KLSGRecommendheader.h"

@implementation KLSGRecommendheader

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self addSubView];
    }
    return self;
}

- (void)addSubView
{
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 7, 10, 16)];
    imageView.image = [UIImage imageNamed:@"finding_title_tag"];
    [self addSubview:imageView];
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(imageView.frame) + 5, 5, 100, 20)];
    self.titleLabel.font = [UIFont systemFontOfSize:15];
    [self addSubview:self.titleLabel];
    
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    self.button.frame = CGRectMake(kScreenWidth - 70, 5, 60, 20);
    self.button.backgroundColor = [UIColor whiteColor];
    [self.button setTitle:@"更多" forState:UIControlStateNormal];
    self.button.titleLabel.font = [UIFont systemFontOfSize:13];
    self.button.titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    self.button.titleEdgeInsets = UIEdgeInsetsMake(5, -130, 5, 20);
    self.button.alpha = 0.7;
    [self.button setImage:[UIImage imageNamed:@"umeng_fb_arrow_right"] forState:UIControlStateNormal];
    self.button.imageEdgeInsets = UIEdgeInsetsMake(0, 40, 0, 10);
    
    [self addSubview:self.button];
}

@end
